

***********************************************************************************************************************
**** Table A14. ITT Effects by Probability of Being on a Sanctioning List *********************************************
***********************************************************************************************************************
use "$data/Non_payment_dataset_ready.dta" , clear

log using "$filepath/output_logs/table A14", replace

local controls "itt2lowdso itt2highdso itt3lowdso itt3highdso dsomedian premeaninvoicew presumpaymentratiow preage_of_accountw preclosingbalancew prepaidcounttotal interviewerdummy* datedummy* schemedummynew*"

probit paidcount `controls' if t==14, vce(cluster customer)
margins, dydx(itt2lowdso itt2highdso itt3lowdso itt3highdso dsomedian) post
est tab, p(%12.10g)

reg lnpayment `controls' if t==14, vce(cluster customer)

preserve 
keep if t==14
capture program drop Ey_boot
program define Ey_boot, eclass
twopm payment itt2lowdso itt2highdso itt3lowdso itt3highdso dsomedian premeaninvoicew presumpaymentratiow preage_of_accountw preclosingbalancew prepaidcounttotal interviewerdummy* datedummy* schemedummynew*, firstpart(probit) secondpart(regress, log) vce(cluster customer)
margins, dydx(itt2lowdso itt2highdso itt3lowdso itt3highdso dsomedian) predict(duan) nose post
end
bootstrap _b, seed(3125) reps(1000): Ey_boot
estimates store highlow
restore
test itt2lowdso = itt2highdso
test itt3lowdso = itt3highdso

log close
